package com.tcm.order.domain.enums;

import com.base.core.result.ResponseCodeEnum;

/**
 * 错误码枚举类
 *
 * 交易系统，使用 1-001-001-000 段
 */
public enum BusinessCodeEnum implements ResponseCodeEnum {


    //===============订单模块=====================
    ID_NOT_EXISTS(1001001001, "订单主键id不存在"),
    ORDER_ITEM_DATA_NOT_EXISTS(1001001003, "订单项数据不存在"),
    ORDER_PARAM_DATA_NOT_EXISTS(1001001002, "订单数据不存在"),
    ORDER_CANCEL_FAIL(1001001005, "取消订单失败,订单状态已支付."),
    ORDER_STATUS_CHANGE_FAIL(1001001014, "订单状态更改失败."),
    ORDER_NOT_EXISTS(1001001008, "订单不存在"),
    PRESCRIBE_IS_USED(1001001013, "处方已经被使用，请不要重复下单"),
    ORDER_IS_PAID(1001001015, "订单已支付"),
    UPDATE_PAYMENT_FAIL(1001001016, "保存支付方式失败")
    ;


    private final int code;
    private final String message;

    BusinessCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

}
